<Collapse OnChange="Callback">
    <Panel Header=@("This is panel header 1") Key="1">
        <Collapse DefaultActiveKey=@(new[]{"1"})>
            <Panel Header=@("This is panel nest panel") Key="1">
                <p>@text</p>
            </Panel>
        </Collapse>
    </Panel>
    <Panel Header=@("This is panel header 2") Key="2">
        <p>@text</p>
    </Panel>
    <Panel Header=@("This is panel header 3") Key="3">
        <p>@text</p>
    </Panel>
</Collapse>

@code{

    string text = @"
A dog is a type of domesticated animal.
Known for its loyalty and faithfulness,
it can be found as a welcome guest in many households across the world.
";

    void Callback(string[] key)
    {
        Console.WriteLine(key);
    }
}